package org.orqlog.client;

import org.orqlog.encoder.RpcRequest;
import org.orqlog.service.UserService;

import java.lang.reflect.Array;

public class ClientBootstrap {
    public static  final String providerName="UserService#sayHello#";

    public static void main(String[] args) throws InterruptedException {

        RpcConsumer rpcConsumer = new RpcConsumer();
        UserService proxy = (UserService) rpcConsumer.createProxy(UserService.class);
        RpcRequest rpcRequest = null;

        while (true){
            Thread.sleep(2000);
            rpcRequest = new RpcRequest();
            rpcRequest.setClassName("org.orqlog.service.UserServiceImpl");
            rpcRequest.setMethodName("methodToCall");
            String[] tArgs = {"The Args"};
            rpcRequest.setParameters(tArgs);

            System.out.println(proxy.sayHello(rpcRequest));
        }


    }
}
